<?php

namespace App\Jobs\Shop;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Redis;

class SyncToMiniDeliverManage implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        //
        $todo_set = Redis::smembers('order:to:mini:deliver:manage:set');
        if($todo_set){
            foreach ($todo_set as $order_id){

                if(_empty_($order_id)){
                    Redis::srem('order:to:mini:deliver:manage:set', $order_id);
                    continue;
                }

                // todo:



                Redis::srem('order:to:mini:deliver:manage:set', $order_id);
            }
        }
    }



}
